package pingji.dao.register.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import pingji.controller.register.RegisterObject;
import pingji.dao.mapper.UserMapper;
import pingji.dao.register.RegisterDao;
import pingji.pojo.User;

@Repository
public class RegisterDaoImpl implements RegisterDao {
    @Autowired
    UserMapper mapper;
    @Override
    public boolean userIsExists(String name) {
        User user=mapper.selectByName(name);
        return user!=null;
    }

    @Override
    public void addUser(RegisterObject o) {
        mapper.addUser(o);
    }
}
